package com.blue.seata.business.controller;

import com.blue.seata.business.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 业务系统
 *
 * @author liulei
 * @version 1.0
 */
@RestController
public class BusinessController {

    @Autowired
    private BusinessService service;

    @GetMapping("/buy")
    public boolean buy(@RequestParam String code, @RequestParam Integer count) throws InterruptedException {
        return service.buy("user_admin", code, count);
    }
}
